package org.bingo.misc;

public class Result {
    private Integer code;
    private String message;
    private Object data;

    public static Result build(ResultState resultState, Object data) {
        return new Result(resultState, data);
    }

    public Result() {
    }

    public Result(ResultState resultState, Object data) {
        this.code = resultState.getCode();
        this.message = resultState.getMessage();
        this.data = data;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
